//
//  AppDelegate.h
//  Mecca
//
//  Created by Ryan Enguero on 5/20/14.
//  Copyright (c) 2014 TapDash Heuristics. All rights reserved.
//  HEY ryan ITS UPDATED!

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>


@interface AppDelegate : UIResponder <UIApplicationDelegate>{

    NSMutableDictionary *dictData;
    NSMutableArray *arrData;
}

@property (strong, nonatomic) UIWindow *window;

@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
@property (strong, nonatomic) NSDictionary *refererAppLink;

@property (strong,nonatomic) AVAudioPlayer *player;

- (void)deleteDownloadingData:(NSInteger)idx;
- (void)downloadingDataWithName:(NSString*)name andArtist:(NSString*)artistName andDuration:(NSString*)duration andImage:(NSString*)imgAlbum andPrice:(NSString*)price andSongID:(NSString*)songID andAlbumName:(NSString*)albumName andSongLyrics:(NSString*)lyrics;
- (void)fetchDownloadingDataFromCoreData;

- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;





- (void)musicDataWithName:(NSString*)name andData:(NSData*)data andSongID:(NSString*)songID andImage:(NSString*)imgAlbum andDuration:(NSString*)songDuration andArtistName:(NSString*)artistName anduserID:(NSString*)userID andAlbumName:(NSString*)albumName andSongLyrics:(NSString*)lyrics;
- (void)fetchMusicDataFromCoreData;
- (void)deleteAllObjectsInCoreData;

- (void)playListArtistName:(NSString*)artistName andAlbumName:(NSString*)albumName;
- (void)fetchPlayListDataFromCoreData;

- (void)getSongListenedWithName:(NSString*)songName andUserID:(NSString*)userID;
- (void)fetchListenedSong;

@end
